package com.boot.controller;

import com.boot.business.PurchaseDTO;
import com.boot.result.Result;
import com.boot.service.ProductService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("product")
@AllArgsConstructor
public class ProductController {
    private final ProductService productService;

    @GetMapping("/{id}")
    public Result getProductById(@PathVariable Long id) {
        return productService.selectProductVoById(id);
    }
}
